import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { EquipIndexComponent } from './equipment/index.component';
import { ClassificationComponent } from './classification/classification.component';
import { GeneralToolsComponent } from './general-tool/general-tool.component';
import { EquipmentsComponent } from './equipment/equipments.component';
import { MaintenancesComponent } from './equipment/maintenance.component';
import { SchedulesComponent } from './equipment/schedule.component';
import { ToolingsComponent } from './tooling/tooling.component';

@NgModule({
    imports: [
        RouterModule.forChild([
            {
                path: '',
                children: [
                  { path: 'equipment', component: EquipIndexComponent, data: { permission: 'Mes58.Pages.Resource.Equipment' } },
                  { path: 'equipments', component: EquipmentsComponent, data: { permission: 'Mes58.Pages.Resource.Equipment.ZY' }},
                  { path: 'maintenances', component: MaintenancesComponent, data: { permission: 'Mes58.Pages.Resource.Equipment.JQ' }  },
                  { path: 'schedules', component: SchedulesComponent, data: { permission: 'Mes58.Pages.Resource.Equipment.RL' }  },
                  { path: 'classification', component: ClassificationComponent, data: { permission: 'Mes58.Pages.Resource.Classification' }  },
                  { path: 'general-tool', component: GeneralToolsComponent, data: { permission: 'Mes58.Pages.Resource.GeneralTool' }  },
                  { path: 'tooling', component: ToolingsComponent, data: { permission: 'Mes58.Pages.Resource.Tooling' }  },
                ]
            }
        ])
    ],
    exports: [
        RouterModule
    ]
})
export class ResourceRoutingModule { }
